The present invention relates in general to data processing systems, and in particular, to the video display of color cursors.
Cursors are commonly used in data processing systems employing a graphical user interface (GUI) to indicate the active point on the screen for a user input action, for example, as a mouse or track ball pointer. Cursors may be implemented either in software, or hardware. Most video devices support cursors generated using monochrome hardware xe2x80x9csprites.xe2x80x9d (The term sprite is common in the art for something that moves around on a video display screen in front of any other objects, and a hardware sprite is a video device for generating the sprite.)
Implementing a cursor as a hardware sprite is advantageous in that the graphic software does not need to draw the cursor on the screen, thereby saving central processing unit (CPU) cycles. A software cursor is literally drawn on the screen by the graphic software, requiring several block level transfers. The portion of the screen image at the location of the cursor is read and stored, then the cursor is drawn by applying two bitmasks, an xe2x80x9cANDxe2x80x9d bitmask and an xe2x80x9cXORxe2x80x9d bitmask, and a color bitmap which is applied via an xe2x80x9cORxe2x80x9d block level transfer. When the cursor is moved or the screen updated behind the cursor, the data stored corresponding to the video image at the previous position of the cursor is then used to restore that image. The read, draw, and write-to screen to restore operations are CPU cycle-intensive.
Moreover, these operations result in a cursor that flickers when displayed on a moving background, such as, a scrolling window. Because hardware sprites never need be removed from the screen to allow the background to be updated, a cursor generated as a hardware sprite does not flicker. Thus, cursors implemented as hardware sprites are advantageous, however, until recently, were only available to provide monochrome cursors. Multicolored cursors, that is, cursors having regions drawn in different colors, had to be implemented in software.
A new generation of video devices support multicolor sprites. These can be used to implement multicolored cursors in hardware. However, this necessitates operating system revisions to provide an applications program interface (API) to implement color cursors as a hardware sprite.
Alternatively, dynamically converting the software cursors to hardware cursors would permit the use of the multicolor sprites without the need to provide additional APIs, and would provide a platform independent mechanism for implementing color cursors. Thus, there is a need in the art for an apparatus and method for generating a multicolor cursor as a multicolor hardware sprite using a pre-existing software color cursor.
The aforementioned needs are addressed by the present invention. Accordingly, there is provided, in a first form, a method of hardware color cursor generation. The method includes accessing a preselected first data structure, and loading a predetermined first data value in a video device buffer in response to a first color data value in the first data structure.
There is also provided, in a second form, a data processing system having circuitry operable for accessing a preselected first data structure. The system also includes circuitry operable for loading a predetermined first data value in a video device buffer in response to a first color data value in the first data structure.
Additionally, there is provided, in a third form, a computer program product operable for storage on program storage media, the program product operable for hardware color cursor generation. The program product includes programming for accessing a preselected first data structure. Also included is programming for loading a predetermined first data value in a video device buffer in response to a first color data value in the first data structure.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention.